<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <lk-box :brand="{123:456}" :lessons="lessons"></lk-box>
    </div>
    <template id="box">
      <h3>{{brand}}</h3>
      <ul>
        <li v-for="item in lessons">{{item}}</li>
      </ul>
    </template>
    <script src="../js/vue.js"></script>

    <script>
      const box = {
        template:"#box",
        props:{
          brand:String,
          lessons:Array//加上类型限定
        }
      }

      //实例化vue
      const app = Vue.createApp({
        data() {
          return {
            msg1: "哈哈哈",
            lessons:['php','mysql','web','javascript','go']
          }
        },
        components:{
          'lk-box':box
        }
      }).mount("#app");
    </script>
  </body>
</html>